// https://iai.sh.cn/problem/485
#include <bits/stdc++.h>
using namespace std;
int main() {

  int n;
  cin >> n;
  int chu = 2;
  while (n != 1) {
    if (n % chu == 0) {
      n = n / chu;
    } else {
      chu++;
    }
    if( chu>5) {
      cout << "Irregular Number";
      return 0;
    }
  }   
  cout << "Regular Number";
  return 0;
}